#define _CRT_SECURE_NO_WARNINGS 1

#include <iostream>
using namespace std;
int main() {
	int n;
	cin >> n;
	if (n < 3)
		cout << 1 << endl;
	int a = 1, b = 1, c;
	n -= 2;
	while (n--)
	{
		c = a + b;
		a = b;
		b = c;
	}
	cout << c << endl;
	return 0;
}